import subprocess
from subprocess import run

# run_exe = "QSVenc\QSVEncC64.exe"
# run_avg = "-i QSVenc\input.mkv -o QSVenc\out.mkv"
run_commond = "QSVenc\\QSVEncC64.exe -i QSVenc\\input.mkv -o QSVenc\\out.mkv"
# run_avg1 = "-o out.mkv"
# run_avg = r"-i D:\0.code\Demo\QSVEnc\input.mkv -o D:\0.code\Demo\QSVEnc\out.mkv --log log.txt --log-level debug"
# run_avg = "-i input.mkv --profile Baseline --level 4.2 --codec h264 --la 2500 \
# --max-bitrate 19000 output-res 1920x1080 --audio-copy --sub-copy --fixed-func -o input_trf.mkv"
# commond.append(run_avg1)
# p = subprocess.Popen("QSVenc\\QSVEncC64.exe -i QSVenc\\input.mkv -o QSVenc\\out.mkv")
# p.returncode
# p.wait()
# p.returncode
tmp = subprocess.run(run_commond, shell=True)
# print(tmp.stdout)
# print(tmp.stderr)
# print(tmp)
